<extend name="Public/base"/>
<block name="content">
<h3 class="col-md-8">行为管理</h3>
<div class="row">
    <div class="col-lg-12">
    	<div class="panel panel-default">
       		<div class="panel-heading ">行为列表
       			<div class="btn-group pull-right">
	       			<a class="btn btn-labeled btn-success "  data-toggle="tooltip"  href="<{:U('addaction')}>">新增</a> 
	                <a class="btn btn-labeled btn-success ajax-post" url="<{:u('setstatus?Model=Action&status=1')}>" target-form="ids">启用</a>
					<a class="btn btn-labeled btn-danger ajax-post" url="<{:u('setstatus?Model=Action&status=0')}>" target-form="ids">禁用</a>
            		<a class="btn btn-labeled btn-danger ajax-post" url="<{:U('setStatus?Model=Action&status=-1')}>" target-form="ids">删除</a>
	         	</div>      			
       		</div>
    		<div class="table-responsive">
    			<table class="table table-striped table-bordered table-hover"> 
                    <thead>
                        <tr>
                		<th style="width: 5%" class="check-all">
                        	<div data-toggle="tooltip" data-title="全选" class="checkbox c-checkbox">
                         		<label>
                            		<input type="checkbox">
                            		<span class="fa fa-check"></span>
                         		</label>
                      		</div>
                        </th>
                		<th class="">编号</th>
                		<th class="">标识</th>
                		<th class="">名称</th>
                		<th class="">类型</th>
                		<th class="">规则</th>
                		<th class="">状态</th>
                		<th class="text-center">操作</th>
                		</tr>
                    </thead>
                    <tbody role="alert" aria-live="polite" aria-relevant="all">
                		<volist name="_list" id="vo">
                		<tr>
                            <td>
                                 <div class="checkbox c-checkbox">
                         			<label>
                            		<input type="checkbox" class="ids" value="<{$vo.id}>" name="ids[]">
                            		<span class="fa fa-check"></span>
                         			</label>
                      			</div>
                      		</td>
                			<td><{$vo.id}></td>
                			<td><{$vo.name}></td>
                			<td><a href="<{:U('editAction?id='.$vo['id'])}>"><{$vo.title}></a></td>
                			<td><span><{:get_action_type($vo['type'])}></span></td>
                			<td><{$vo.remark}></td>
                			<td><{$vo.status_text}></td>
                			<td class="text-center"><a href="<{:U('User/editAction?id='.$vo['id'])}>">编辑</a>
                				<a href="<{:U('User/setStatus?Model=action&ids='.$vo['id'].'&status='.abs(1-$vo['status']))}>" class="ajax-get"><{$vo.status|show_status_op}></a>
                				<a href="<{:U('User/setStatus?Model=action&status=-1&ids='.$vo['id'])}>" class="confirm ajax-get">删除</a>
                                </td>
                		</tr>
                		</volist>
                	</tbody>
                </table>
     		</div>
    		<!-- 结束 表格 -->
    		<div class="panel-footer">
				<div class="row">
					<div class="page">
					<{$_page}>
					</div>
				</div>
            </div>    		
    	</div>
	</div>
</div>
</block>
<block name="script">
<script type="text/javascript">
highlight_subnav("<{:U('User/index')}>","<{:U('User/action')}>");
$(function(){
	/*$("#action_add").click(function(){
		window.location.href = $(this).attr('url');
	})*/
})
</script>
</block>
